package LuMin.timer;

import java.util.Timer;
import java.util.TimerTask;

/**
 * @author lumin
 * @date 2022/04/27 18:40
 **/
public class UserTimer {
    public static void main(String[] args) {
        Timer timer = new Timer();
        TimerTask task = new TimerTask() {
            @Override
            public void run() {
                System.out.println("闹钟响了");
            }
        };


        timer.schedule(task,5000);
//        timer.scheduleAtFixedRate(task,1000,1500);
    }
}